//package com.example.tests;

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.regex.Pattern;

public class Dealer_DealerToolsPage_TextVerify extends SeleneseTestCase {
	@Before
	public void setUp() throws Exception {
		selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://www.gfwfn.com/DealerLogin.php");
		selenium.start();
	}

	@Test
	public void testUntitled() throws Exception {
		selenium.open("/DealerLogin.php");
		selenium.type("id=txtUsername", "99999");
		selenium.type("id=txtPassword", "Ldldvht9");
		selenium.click("name=submit");
		selenium.waitForPageToLoad("30000");
		selenium.click("css=img[alt=\"Tools\"]");
		verifyTrue(selenium.isElementPresent("id=header"));
		verifyTrue(selenium.isElementPresent("id=header"));
		verifyTrue(selenium.isElementPresent("css=img[alt=\"Check out the all-new 2013 Fusion\"]"));
		verifyTrue(selenium.isElementPresent("id=header"));
		verifyTrue(selenium.isElementPresent("css=img[alt=\"Click for Live Chat\"]"));
		verifyTrue(selenium.isElementPresent("css=img[alt=\"Home\"]"));
		verifyTrue(selenium.isElementPresent("css=img[alt=\"Tools\"]"));
		verifyTrue(selenium.isElementPresent("css=img[alt=\"POP Kit\"]"));
		verifyTrue(selenium.isElementPresent("css=img[alt=\"RSVPs\"]"));
		verifyTrue(selenium.isElementPresent("css=h2"));
		verifyTrue(selenium.isTextPresent("Charity Status:"));
		verifyTrue(selenium.isElementPresent("css=strong"));
		verifyTrue(selenium.isElementPresent("css=p"));
		verifyTrue(selenium.isElementPresent("//div[@id='content']/div[2]/table/tbody/tr/td[2]/p[2]"));
		verifyTrue(selenium.isTextPresent("Registration URL:"));
		verifyTrue(selenium.isTextPresent("Event Times:"));
		verifyTrue(selenium.isTextPresent("Start Time:"));
		verifyTrue(selenium.isTextPresent("exact:http://www.gofurtherwithfordnight2.com/Registration.php?ID=994f06ea-91e5-49d9-8864-1e0c5949b3e8&dn=VGVzdCBEZWFsZXJzaGlw"));
		verifyTrue(selenium.isElementPresent("link=exact:http://www.gofurtherwithfordnight2.com/Registration.php?ID=994f06ea-91e5-49d9-8864-1e0c5949b3e8&dn=VGVzdCBEZWFsZXJzaGlw"));
		verifyTrue(selenium.isElementPresent("//div[@id='content']/div[2]/table/tbody/tr[2]/td[2]/p[2]"));
		verifyTrue(selenium.isTextPresent("Your unique Registration URL allows you to customize promotional elements. It can be copied and pasted into the evite template so that recipients RSVP directly to your online Registration site."));
		verifyTrue(selenium.isElementPresent("id=selStartTime"));
		verifyTrue(selenium.isTextPresent("End Time:"));
		verifyTrue(selenium.isElementPresent("//form[@id='regForm']/label[2]"));
		verifyTrue(selenium.isElementPresent("id=selEndTime"));
		verifyTrue(selenium.isElementPresent("id=timeSubmit"));
		verifyTrue(selenium.isElementPresent("//div[@id='content']/div[2]/table/tbody/tr[3]/td[2]/p[2]"));
		verifyTrue(selenium.isElementPresent("css=span"));
		verifyTrue(selenium.isElementPresent("css=p > strong"));
		verifyTrue(selenium.isTextPresent("Below are links to items you’ll need to help advertise, promote and manage your event."));
		verifyTrue(selenium.isTextPresent("FAQs"));
		verifyTrue(selenium.isElementPresent("link=FAQs"));
		verifyTrue(selenium.isTextPresent("EVENT CHECKLIST"));
		verifyTrue(selenium.isElementPresent("link=EVENT CHECKLIST"));
		verifyTrue(selenium.isElementPresent("link=EVENT CHECKLIST"));
		verifyTrue(selenium.isElementPresent("css=em > strong"));
		verifyTrue(selenium.isTextPresent("TRYOUT APP"));
		verifyTrue(selenium.isTextPresent("Please Download Video and Instructions First"));
		verifyTrue(selenium.isElementPresent("link=SET-UP INSTRUCTIONS/FAQ"));
		verifyTrue(selenium.isElementPresent("link=SET-UP VIDEO"));
		verifyTrue(selenium.isElementPresent("link=COMPUTER SYSTEMS CHECK"));
		verifyTrue(selenium.isElementPresent("link=WEBCAM DRIVER INSTRUCTIONS (XP/VISTA)"));
		verifyTrue(selenium.isElementPresent("link=WINDOWS MEDIA PLAYER UPGRADE"));
		verifyTrue(selenium.isElementPresent("link=PRESS RELEASE"));
		verifyTrue(selenium.isTextPresent("EVITE TEMPLATE\n Word\n Instructions for above\n PDF\n Instructions for above\n (Download, then copy and paste your registration URL from above)"));
		verifyTrue(selenium.isElementPresent("link=Word"));
		verifyTrue(selenium.isElementPresent("link=Instructions for above"));
		verifyTrue(selenium.isElementPresent("link=PDF"));
		verifyTrue(selenium.isElementPresent("//a[contains(text(),'Instructions\n        for above')]"));
		verifyTrue(selenium.isTextPresent("Word\n Instructions for above\n PDF\n Instructions for above\n (Download, then copy and paste your registration URL from above)"));
		verifyTrue(selenium.isElementPresent("link=FMCDealer eVite (DADS)"));
		verifyTrue(selenium.isTextPresent("WEB BANNER\n 160x600 300x250 728x90"));
		verifyTrue(selenium.isElementPresent("link=160x600"));
		verifyTrue(selenium.isElementPresent("link=300x250"));
		verifyTrue(selenium.isElementPresent("link=728x90"));
		verifyTrue(selenium.isElementPresent("link=FACEBOOK POST"));
		verifyTrue(selenium.isElementPresent("link=TWITTER POST"));
		verifyTrue(selenium.isElementPresent("link=CALL SCRIPT"));
		verifyTrue(selenium.isTextPresent("TELEVISION TAG\n Copy\n Billboard Art"));
		verifyTrue(selenium.isElementPresent("link=Copy"));
		verifyTrue(selenium.isElementPresent("link=Billboard Art"));
		verifyTrue(selenium.isTextPresent("RADIO SCRIPTS\n :30 :60"));
		verifyTrue(selenium.isElementPresent("link=exact::30"));
		verifyTrue(selenium.isElementPresent("link=exact::60"));
		verifyTrue(selenium.isTextPresent("NEWSPAPER AD\n FULL PAGE\n 1/2 PAGE\n 1/4 PAGE"));
		verifyTrue(selenium.isElementPresent("link=FULL PAGE"));
		verifyTrue(selenium.isElementPresent("link=1/2 PAGE"));
		verifyTrue(selenium.isElementPresent("link=1/4 PAGE"));
		verifyTrue(selenium.isTextPresent("NEWSPAPER BUG\n Art Card A\n Art Card B"));
		verifyTrue(selenium.isElementPresent("link=Art Card A"));
		verifyTrue(selenium.isElementPresent("link=Art Card B"));
		verifyTrue(selenium.isTextPresent("exact:Note: Use of the American Idol® name and/or logo in any way other than how it has been provided in these files is strictly prohibited and subject to legal action."));
		verifyTrue(selenium.isElementPresent("link=FDAF Toolbox."));
		verifyTrue(selenium.isTextPresent("For additional customizable program elements please visit the FDAF Toolbox."));
		verifyTrue(selenium.isTextPresent("exact:Have Questions? Call 1-800-757-5754 \nAmerican Idol ®/© 19 TV Ltd. and FremantleMedia North America. 2013 All Rights Reserved. www.americanidol.com\nCharitable donations are the sole responsibility of Ford, not American Idol® or related parties."));
		verifyTrue(selenium.isTextPresent("American Idol ®/© 19 TV Ltd. and FremantleMedia North America. 2013 All Rights Reserved. www.americanidol.com\nCharitable donations are the sole responsibility of Ford, not American Idol® or related parties."));
		verifyTrue(selenium.isElementPresent("link=www.americanidol.com"));
		verifyTrue(selenium.isElementPresent("link=Official Rules"));
		verifyTrue(selenium.isElementPresent("link=Privacy Statement"));
		verifyTrue(selenium.isElementPresent("link=CA Privacy Statement"));
	}

	@After
	public void tearDown() throws Exception {
		selenium.stop();
	}
}
